class Solution(object):
    def construct2DArray(self, original, m, n):
        t = len(original)
        if m * n != t:
            return []
        out = [[0 for _ in range(n)] for _ in range(m)]
        for i in range(m):
            for j in range(n):
                out[i][j] = original[i * n + j]
        return out